package com.wxservice.domain.request;


import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;


import java.util.List;



//模板发送操作
public class SentTemplate {
    @JSONField(serialize = false)
    //接口调用凭证access_token
    private String access_token;
    //模板IDtemplate_id
    private String template_id;
    //接收者openid
    private String touser;
    //模板data,需要根据模板填写为JSON格式
    private JSONObject data;
    //模板跳转url
    private String url;
    //miniprogram跳小程序所需数据，不需跳小程序可不用传该数据，里面可带有小程序appid，小程序pagepath
    private Miniprogram miniprogram;
    //用于群发信息的List<String> toUsers
    private List<String> toManyUser;


    public SentTemplate(String access_token, String template_id, String touser, JSONObject data, String url, Miniprogram miniprogram) {
        this.access_token = access_token;
        this.template_id = template_id;
        this.touser = touser;
        this.data = data;
        this.url = url;
        this.miniprogram = miniprogram;
    }

    public SentTemplate(String access_token, String template_id, JSONObject data, String url, Miniprogram miniprogram) {
        this.access_token = access_token;
        this.template_id = template_id;
        this.data = data;
        this.url = url;
        this.miniprogram = miniprogram;
    }

    @Override
    public String toString() {
        return "SentTemplate{" +
                "access_token='" + access_token + '\'' +
                ", template_id='" + template_id + '\'' +
                ", touser='" + touser + '\'' +
                ", data=" + data +
                ", url='" + url + '\'' +
                ", miniprogram=" + miniprogram +
                ", toManyUser=" + toManyUser +
                '}';
    }

    public String getAccess_token() {
        return access_token;
    }

    public void setAccess_token(String access_token) {
        this.access_token = access_token;
    }

    public String getTemplate_id() {
        return template_id;
    }

    public void setTemplate_id(String template_id) {
        this.template_id = template_id;
    }

    public String getTouser() {
        return touser;
    }

    public void setTouser(String touser) {
        this.touser = touser;
    }

    public JSONObject getData() {
        return data;
    }

    public void setData(JSONObject data) {
        this.data = data;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Miniprogram getMiniprogram() {
        return miniprogram;
    }

    public void setMiniprogram(Miniprogram miniprogram) {
        this.miniprogram = miniprogram;
    }

    public List<String> getToManyUser() {
        return toManyUser;
    }

    public void setToManyUser(List<String> toManyUser) {
        this.toManyUser = toManyUser;
    }

    public SentTemplate() {
    }

    public SentTemplate(String access_token, String template_id, String touser, JSONObject data, String url, Miniprogram miniprogram, List<String> toManyUser) {
        this.access_token = access_token;
        this.template_id = template_id;
        this.touser = touser;
        this.data = data;
        this.url = url;
        this.miniprogram = miniprogram;
        this.toManyUser = toManyUser;
    }
}
